package com.CalendarDemo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;

public class CalendarTest2 {
    public static void main(String[] args) throws ParseException {
        // 从键盘录入，判断一年中的第几天
        Scanner sc=new Scanner(System.in);
        String dateContext = sc.nextLine();

        SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy年MM月dd日");
        Date date = simpleDateFormat.parse(dateContext);

        Calendar c=Calendar.getInstance();
        c.setTime(date);

        int dayOfYear = c.get(Calendar.DAY_OF_YEAR);
        System.out.println("是这一年中的第"+dayOfYear+"日");


    }
}
